package com.sghd.candy.module.account.facade;

import com.sghd.common.socket.anno.InSession;
import com.sghd.common.socket.anno.SocketCommand;
import com.sghd.common.socket.anno.SocketModule;
import com.sghd.common.socket.core.ResultCallback;
import com.sghd.common.socket.session.Session;
import com.sghd.pojo.candy.account.to.SmsCodeTo;
import com.sghd.pojo.candy.player.vo.LoginReq;
import com.sghd.pojo.fight.game.Result;

import static com.sghd.candy.utils.SocketEnum.BIND_PHONE;
import static com.sghd.candy.utils.SocketEnum.LOGIN;
import static com.sghd.common.socket.session.SessionKeys.IDENTITY;

/**
 * @author frank
 * @date 2018-10-17 10:10
 * @desc
 **/
@SocketModule
public interface AccountFacade {

    @SocketCommand(LOGIN)
    Result<Object> login(Session session, LoginReq loginReq);

    @SocketCommand(BIND_PHONE)
    void bindPhone(@InSession(IDENTITY) long playerId, SmsCodeTo smsCodeTo, ResultCallback<Result<String>> callback);
}
